# -*- coding: utf-8 -*-
# To change this template, choose Tools | Templates
# and open the template in the editor.

class OrderUtil
  def initialize
    
  end


  #sequence pattern，次序的模式，不同的项目，要求的模式不同。
  SNPATTERN = "科勒"
  UNCOMMITTED = "未提交"
  COMMITTED = "已经提交"

  #依次输入订单名称的缩写、订单上次的流水号、订单类型（对于销售订单来说就是针对个人，还是工程，还是代理）、部门编号、员工编号
  def self.generate_order_number orderTypeAB,seq,saleType,department,employee
    return orderTypeAB + ":" + seq + ":" + saleType + ":" + department.number.to_s + ":" + employee.ab.to_s + ":" + Date.today.to_s
  end

  def self.testSession
    puts session[:employee]
  end
end
